part of receive_sharing_intent_ohos;

class SharedMediaFile {
  /// 数据记录的uri（content和uri二者至少有一个不为空）
  final String? uri;

  /// 如果是文本、链接等内容，建议填入title标识其标题。
  final String? title;

  /// 标识当前数据记录类型的标签。
  final String? label;

  /// 数据记录的描述。
  final String? description;

  /// 统一数据类型
  final String? utd;

  /// 数据记录内容
  final String? content;

  SharedMediaFile({
    required this.uri,
    required this.title,
    required this.label,
    required this.description,
    required this.utd,
    this.content,
  });

  SharedMediaFile.fromMap(Map<String, dynamic> json)
      : uri = json['uri'],
        title = json['title'],
        label = json['label'],
        description = json['description'],
        utd = json['utd'],
        content = json['content'];

  Map<String, dynamic> toMap() {
    return {
      'uri': uri,
      'title': title,
      'label': label,
      'description': description,
      'utd': utd,
      'content': content,
    };
  }
}
